<include file="public/layout" />
<style>
.ncm-goods-gift {
	text-align: left;
}
.ncm-goods-gift ul {
    display: inline-block;
    font-size: 0;
    vertical-align: middle;
}
.ncm-goods-gift li {
    display: inline-block;
    letter-spacing: normal;
    margin-right: 4px;
    vertical-align: top;
    word-spacing: normal;
}
.ncm-goods-gift li a {
    background-color: #fff;
    display: table-cell;
    height: 30px;
    line-height: 0;
    overflow: hidden;
    text-align: center;
    vertical-align: middle;
    width: 30px;
}
.ncm-goods-gift li a img {
    max-height: 30px;
    max-width: 30px;
}

a.green{
	
	background: #fff none repeat scroll 0 0;
    border: 1px solid #f5f5f5;
    border-radius: 4px;
    color: #999;
    cursor: pointer !important;
    display: inline-block;
    font-size: 12px;
    font-weight: normal;
    height: 20px;
    letter-spacing: normal;
    line-height: 20px;
    margin: 0 5px 0 0;
    padding: 1px 6px;
    vertical-align: top;
}

a.green:hover { color: #FFF; background-color: #1BBC9D; border-color: #16A086; }

.ncap-order-style .ncap-order-details{
	margin:20px auto;
}
.contact-info h3,.contact-info .form_class{
  display: inline-block;
  vertical-align: middle;
}
.form_class i.fa{
  vertical-align: text-bottom;
}
</style>
<div class="page">
  <div class="fixed-bar">
    <div class="item-title"><a class="back" href="javascript:history.go(-1)" title="返回列表"><i class="fa fa-arrow-circle-o-left"></i></a>
      <div class="subject">
        <h3>提酒订单</h3>
        <h5>商城实物商品交易订单查询及管理</h5>
      </div>
    </div>
      
  </div>
  <div class="ncap-order-style">
    <div class="titile">
      <h3></h3>
    </div>
 
    <div class="ncap-order-details">
      <form id="order-action">
        <div class="tabs-panels">
        <div class="misc-info">
           <h3>基本信息</h3>
           		<dl>
		            <dt>订单 ID:</dt>
		            <dd>{$order.id}</dd>
		            <dt>订单号:</dt>
		            <dd>{$order.order_info.order_sn}</dd>
		            <dt>会员:</dt>
		            <dd>{$order.nickname}</dd>
		          </dl>
			       <dl>
	              	<dt>订单状态:</dt>
		            <dd>{$order_status[$order.order_info[order_status]]} / {$pay_status[$order.order_info[pay_status]]}</dd>
		            <dt>下单时间:</dt>
		            <dd>{$order.addtime|date='Y-m-d H:i',###}</dd>
		            <dt>支付时间:</dt>
		            <dd><if condition="$order.order_info.pay_time neq 0">{$order.order_info.pay_time|date='Y-m-d H:i',###}<else/>N</if></dd>
			       </dl>
			       <dl>
	              	<dt>支付方式:</dt>
		            <dd>{$order.order_info.pay_name|default='其他方式'}</dd>
		            </dl>
        	</div>
        
        <div class="addr-note">
          <h4>收货信息</h4>
          <dl>
            <dt>收货人：</dt>
            <dd>{$order.address.consignee}</dd>
            <dt>联系方式：</dt>
            <dd>{$order.address.mobile}</dd>
          </dl>
          <dl>
            <dt>收货地址：</dt>
            <dd>{$order.address.address}</dd>
          </dl>
          <dl>
            <dt>邮编：</dt>
            	<dd><if condition="$order.address.zipcode neq ''"> {$order.address.zipcode}<else/>N</if></dd>
          </dl>
          <dl>
           		<dt>配送方式：</dt>
            	<dd>{$order.order_info.shipping_name}</dd>
          	</dl>
        </div>
  
         
        <div class="goods-info">
          <h4>商品信息</h4>
          <table>
            <thead>
              <tr>
                <th colspan="2">商品</th>
                <th>规格属性</th>
                <th>数量</th>
                <th>单品价格</th>
                <th>商品总价值</th>
              </tr>
            </thead>
            <tbody>
            <volist name="orderGoods" id="good">
           	<tr>
                <td class="w30"><div class="goods-thumb"><a href="{:U('Mobile/Cellar/goodsInfo',array('id'=>$good['goods_id']))}" target="_blank"><img alt="" src="{$good['goods_id']|goods_thum_images=200,200}" /> </a></div></td>
                <td style="text-align: left;"><a href="{:U('Mobile/Cellar/goodsInfo',array('id'=>$good['goods_id']))}" target="_blank">{$good.goods_name}</a><br/></td>
                <td class="w80">{$good.spec_key_name}</td>
                <td class="w60">{$order.num}</td>
                <td class="w100">{$good.goods_price}</td>
                <td class="w80">{$order.total}</td>
            </tr>

            <tr>
            	<td colspan="7" style="text-align: left;">酒坛编号：<input type="text" name="bottle_num" value="{$order.bottle_num}" style="width: 70%;">(注：以英文分号隔开)</td>
            </tr>
            </volist>
          </table>
        </div>
        <div class="total-amount contact-info">
        </div>
        <div class="contact-info">
          <h3>费用信息 </h3>
          <div class="form_class">
          		<a class="btn green" href="{:U('Admin/Order/editprice',array('order_id'=>$order['order_id']))}"><i class="fa fa-pencil-square-o"></i>修改费用</a>
          </div>   
          <dl>
            <dt>运费：</dt>
            <dd>+{$order.order_info.shipping_price}</dd>
          </dl>
        </div>
        <div class="contact-info">
          <h3>操作信息</h3>
          <dl class="row">
	        <dt class="tit">
	          <label for="note">操作备注</label>
	        </dt>
	        <dd class="opt" style="margin-left:10px">
	         <textarea id="note" name="note" style="width:600px" rows="6"  placeholder="请输入操作备注" class="tarea">{$keyword.text}</textarea>
	        </dd>
	      </dl> 
	      <dl class="row">
	        <dt class="tit">
	          <label for="note">可执行操作</label>
	        </dt>
	        <dd class="opt" style="margin-left:10px">
	         	<foreach name="button" item="vo" key="k">
	         		<if $k=='delivery'>
                    <a class="ncap-btn-big ncap-btn-green" href="{:U('Admin/cellar/delivery_info',array('recod_id'=>$order['id']))}" >
               		{$vo}</a>
               		<else>
               		<a class="ncap-btn-big ncap-btn-green" onclick="ajax_submit_form('order-action','{:U('Admin/cellar/orderAction',array('recod_id'=>$order['id'],'action'=>$k))}');" >
               		{$vo}</a>
               		</else>
               		</if>
               	</foreach>
	        </dd>
	      </dl> 
        </div>
        <div class="goods-info">
          <h4>操作记录</h4>
          <table>
            <thead>
              <tr>
                <th>操作者</th>
                <th>操作时间</th>
                <th>订单状态</th>
                <th>付款状态</th>
                <th>描述</th>
                <th>备注</th>
              </tr>
            </thead>
            <tbody>
            <volist name="action_log" id="log">
	           	<tr>
	                 <td class="text-center"><if condition="$log.action_user eq 0">管理员<else/>{$log.action_user_name}</if></td>
	                 <td class="text-center">{$log.log_time|date='Y-m-d H:i:s',###}</td>
	                 <td class="text-center">{$order_status[$log[order_status]]}</td>
	                 <td class="text-center">{$pay_status[$log[pay_status]]}<if condition="$order['pay_code'] eq 'code'"><span style="color: red">(自提)</span></if></td>
	                 <td class="text-center">{$log.status_desc}</td>
	                 <td class="text-center">{$log.action_note}</td>
	             </tr>
              </volist>
          </table>
        </div>
      </div>
      </form>
  	</div>
  </div>
</div>
</body>
</html>